//
//  TableViewCell.m
//  JWMovie
//
//  Created by Jorn.Wu on 15/7/17.
//  Copyright (c) 2015年 Jorn.Wu. All rights reserved.
//

#import "MoreTableViewCell.h"
#import "MoreCellModel.h"

@interface MoreTableViewCell()

@end

@implementation MoreTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor clearColor];
    }
    return self;
}

- (void)setCellModel:(MoreCellModel *)cellModel{
    _cellModel = cellModel;
    
    self.imageView.image = [UIImage imageNamed:_cellModel.imageName];
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.textLabel.text = _cellModel.text;
    self.textLabel.textColor = [UIColor grayColor];
    
    [self setNeedsLayout];
    
}

+ (instancetype)moreTableViewCellWith:(UITableView *)table{
    static NSString *ID = @"moreCell";
    MoreTableViewCell *cell = [table dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[self alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    return cell;
}




















- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
